package com.lawyer.entity;

import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author Administrator 律师基本信息表
 *
 */
/**
 * @author Administrator
 *
 */
@Entity
@Table
public class Lawyer extends AbstractAuditingEntity {

	@Id
	private String id;

	@ApiModelProperty(value = "登陆账号")
	@Column(unique = true)
	private String username;

	@ApiModelProperty(value = "密码")
	private String password;

	@ApiModelProperty(value = "律师名字")
	private String nickName;

	@ApiModelProperty(value = "律师电话号码")
	private String phone;

	@ApiModelProperty(value = "律师头像")
	private String headerIco;

	@ApiModelProperty(value = "性别,男/女", example = "男")
	private String gender;

	@ApiModelProperty(value = "我的余额")
	private Double balance;

	@ApiModelProperty(value = "咨询价格", example = "120/次")
	private Double consultPrice;

	@ApiModelProperty(value = "律师专注案件类型ID")
	private String caseTypeId;

	@ApiModelProperty(value = "律师专注案件类型(中文)")
	private String caseType;

	@ApiModelProperty(value = "综合评分")
	private Double comprehensiveScore;

	@ApiModelProperty(value = "是否可用")
	private Boolean enabled = true;

	@ApiModelProperty(value = "所属区域编号")
	private String location;

	@ApiModelProperty(value = "律师地址拼接")
	private String address;

	@ApiModelProperty(value = "标签", example = "妇友之友,妇科圣手")
	private String label;

	@ApiModelProperty(value = "自我介绍")
	private String introduceMyself;

	@ApiModelProperty(value = "是否在线:0离线,1在线")
	private String onLine;

	@ApiModelProperty(value = "主页轮播图片")
	@Column(columnDefinition = "LONGTEXT")
	private String homePagePic;

	@ApiModelProperty(value = "cid")
	private String cid;

	@ApiModelProperty(value = "是否空闲,true=空闲，false=通话中")
	private Boolean isFree;

	@ApiModelProperty(value = "是否为推荐律师,true=是推荐律师，false=不是推荐律师")
	private Boolean recommend = false;

	@ApiModelProperty(value = "律师星级,默认1星")
	private String star = "一星律师";

	@ApiModelProperty(value = "律师星级,默认1星")
	private Integer starLevel = 1;

	@ApiModelProperty(value = "律师是否认证,0=未认证,1=审核中,2=审核通过,3=审核不通过")
	private Integer certification = 0;

	@ApiModelProperty(value = "工作年限")
	private Integer workYear = 0;

	@ApiModelProperty(value = "执业证照连接")
	private String licensedUrl;

	@ApiModelProperty(value = "true=有权限接受上门服务,false=没有权限接受上门服务任务")
	private Boolean doorPermissions = false;

	// 不映射数据库
	@ApiModelProperty(value = "连麦评分列表")
	@Transient
	private List<LawyerMicroScoreInfo> maiScoreLogs;

	@ApiModelProperty(value = "经典案例列表")
	@Transient
	private List<LawyerCaseInfo> lawyerCaseInfos;

	@ApiModelProperty(value = "主页轮播图片")
	@Transient
	private List<String> homePicList;

	@ApiModelProperty(value = "是否关注,true=已关注,false=未关注")
	@Transient
	private Boolean isFocus;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public Double getComprehensiveScore() {
		return comprehensiveScore;
	}

	public void setComprehensiveScore(Double comprehensiveScore) {
		this.comprehensiveScore = comprehensiveScore;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getIntroduceMyself() {
		return introduceMyself;
	}

	public void setIntroduceMyself(String introduceMyself) {
		this.introduceMyself = introduceMyself;
	}

	public String getOnLine() {
		return onLine;
	}

	public void setOnLine(String onLine) {
		this.onLine = onLine;
	}

	public Boolean getIsFree() {
		return isFree;
	}

	public void setIsFree(Boolean isFree) {
		this.isFree = isFree;
	}

	public List<LawyerMicroScoreInfo> getMaiScoreLogs() {
		return maiScoreLogs;
	}

	public void setMaiScoreLogs(List<LawyerMicroScoreInfo> maiScoreLogs) {
		this.maiScoreLogs = maiScoreLogs;
	}

	public String getHeaderIco() {
		return headerIco;
	}

	public void setHeaderIco(String headerIco) {
		this.headerIco = headerIco;
	}


	public String getCaseTypeId() {
		return caseTypeId;
	}

	public void setCaseTypeId(String caseTypeId) {
		this.caseTypeId = caseTypeId;
	}

	public List<LawyerCaseInfo> getLawyerCaseInfos() {
		return lawyerCaseInfos;
	}

	public void setLawyerCaseInfos(List<LawyerCaseInfo> lawyerCaseInfos) {
		this.lawyerCaseInfos = lawyerCaseInfos;
	}

	public Boolean getRecommend() {
		return recommend;
	}

	public void setRecommend(Boolean recommend) {
		this.recommend = recommend;
	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}

	public String getHomePagePic() {
		return homePagePic;
	}

	public void setHomePagePic(String homePagePic) {
		this.homePagePic = homePagePic;
	}

	public List<String> getHomePicList() {
		if (homePagePic != null) {
			return Arrays.asList(homePagePic.split(";"));

		} else {
			return new ArrayList<String>();
		}
	}

	public void setHomePicList(List<String> homePicList) {
		this.homePicList = homePicList;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getCid() {
		return cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	public Boolean getIsFocus() {
		return isFocus;
	}

	public void setIsFocus(Boolean isFocus) {
		this.isFocus = isFocus;
	}

	public Double getConsultPrice() {
		return consultPrice;
	}

	public void setConsultPrice(Double consultPrice) {
		this.consultPrice = consultPrice;
	}

	public String getStar() {
		return star;
	}

	public void setStar(String star) {
		this.star = star;
	}

	public Integer getCertification() {
		return certification;
	}

	public void setCertification(Integer certification) {
		this.certification = certification;
	}

	public Integer getWorkYear() {
		return workYear;
	}

	public void setWorkYear(Integer workYear) {
		this.workYear = workYear;
	}

	public String getLicensedUrl() {
		return licensedUrl;
	}

	public void setLicensedUrl(String licensedUrl) {
		this.licensedUrl = licensedUrl;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Integer getStarLevel() {
		return starLevel;
	}

	public void setStarLevel(Integer starLevel) {
		this.starLevel = starLevel;
	}

	public Boolean getDoorPermissions() {
		return doorPermissions;
	}

	public void setDoorPermissions(Boolean doorPermissions) {
		this.doorPermissions = doorPermissions;
	}

	public String getCaseType() {
		return caseType;
	}

	public void setCaseType(String caseType) {
		this.caseType = caseType;
	}

}
